package com.gym.openapi.services;

import com.gym.openapi.common.ResponseResult;
import com.gym.openapi.common.ResultTable;
import com.gym.openapi.entity.AdminUser;

import java.util.List;

/**
 * @author ming
 * 2021/11/23
 * description:
 */
public interface AdminUserServices {

    /**
     *@author:ming
     *@Date: 2021/11/23
     *@description:查询用户是否存在
     */
    AdminUser getUserByEmail(String email);

    /**
     * @author:ming
     * @Date: 2021/11/23
     * @description:登录业务
     */
    AdminUser doLogin(String email, String password);

    /**
     *@author:ming
     *@Date: 2021/11/25
     *@description:用户界面管理，查询搜索
     */
    ResultTable table(Integer page, Integer limit, String realName, String email, Integer status);

    List<Integer> getUserRole(Integer userId);

    ResponseResult assignRole(Integer userId, Integer[] roleIds);

    ResponseResult delUsers(Integer[] ids);

    ResponseResult addUser(AdminUser user);

    ResponseResult updateUser(AdminUser user);


}
